DevJourney

NodeJS/geeksforgeekstutorial/File Server/File Management/Write File/server.js

var fs = require('fs');

fs.writeFile('mynewfile3.txt', 'Hello content!', function (err) {
  if (err) throw err;
  console.log('Saved!');
});
View on GitHub